<!DOCTYPE html>
<html lang="zh-cn">
<head> <meta charset="UTF-8"/>
<title>{if $title} {$title} {else} {if !empty($set['copyright'])} {$set['copyright']}
    {else}{$_W['account']['name']}{/if} {/if}
    {if $_W['account']['siteinfo']['sitename']}{$_W['account']['siteinfo']['sitename']} {/if}</title>
<meta name="description" content="{if $title} {$title} {else}  {if !empty($set['copyright'])} {$set['copyright']} {else}{$_W['account']['name']}{/if} {/if} {if $_W['account']['siteinfo']['sitename']}{$_W['account']['siteinfo']['sitename']} {/if}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<link rel="stylesheet" href="{RES}css/wemedia_style.css"/>
    {php echo register_jssdk(false);}
<link rel="stylesheet" href="{RES}css/add2home.css"/>
<script src="{RES}js/jquery.min.js?v=20150404"></script>
<script src="{RES}js/flipsnap.js"></script>
<script src="{RES}js/jquery.slides.min.js"></script>
<script src="{RES}js/main.js"></script>
<!-- IOS -->
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="apple-mobile-web-app-title" content=""/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="format-detection" content="telephone=no"/>
<script src="{RES}js/add2home.js?v=201"></script>
</head>
<body>
{if count($advlist)>0}
<div class="row-fluid" style="margin-top:4px;">
    <div id="focus" class="focus">
        <div class="hd" style="display:none;">
            <ul></ul>
        </div>
        <div class="bd">
            <ul>
                {loop $advlist $adv}
                <li><a href="{$adv['link']}">
                    <img align="absmiddle" src="{php echo strpos($adv['thumb'], 'http://') === FALSE ? tomedia($adv['thumb']) : $adv['thumb']}"  style="height:154px;width: 100%;" >
                </a>
                </li>
                {/loop}
            </ul>
        </div>
    </div>
</div>
{/if}

<div class="top-container" data-role="header">
    <div class="avatar index">
        <a href="{$set['guanzhuUrl']}">
        {if !empty($set['logo'])}
            <img src="{php echo strpos($set['logo'],'http://')===FALSE?tomedia($set['logo']):$set['logo']}" height="80" width="80"/>
        {else}
            <img src="{RES}images/logo_80.png"  alt="Logo"/>
        {/if}
    </a>
    </div>
    <div class="account-info">
        <h1 class="name">{if $title} {$title} {else} {if !empty($set['copyright'])} {$set['copyright']}
            {else}{$_W['account']['name']}{/if} {/if}
            {if $_W['account']['siteinfo']['sitename']}{$_W['account']['siteinfo']['sitename']} {/if}
        </h1>
        <h2 class="desc">
            <span>{if !empty($set['title'])} {$set['title']} {else} {if empty($category)}  {else} {$category['name']} {/if} {/if} </span>
            <span class="button-follow-container">
                <a href="javascript:;" id="side_menu_button">
                <img src="{RES}images/list_right.png"/>
                </a>
            </span>
        </h2>
    </div>
</div>

<div class="list-container">
    {loop $list  $row}
    <div class="article-item">
        <a href="{php echo $this->createMobileUrl('detail',array('id' => $row['id'],'op'=>'wemedia'),true)}">
            <div class="item-cover">
                <img src="{RES}images/loading.gif" data-original="{php echo strpos($row['thumb'],'http://')===FALSE?tomedia($row['thumb']):$row['thumb']}" alt="{$row[title]}" />
            </div>
            <div class="item-summary">
                <div class="item-title">{$row[title]}</div>
                <div class="item-text">By&nbsp;{if empty($row['author'])}{$_W['account']['name']}{else}{$row['author']}{/if}
					<span class="item-text-right">  {$row['clickNum']}</span>
                </div>
            </div>
        </a>
    </div>
    {/loop}
</div>

<div class="side-right-menu">
    <div class="sidebox">
        <ul>
            <li>&nbsp;</li>
            <li><a href="{php echo $this->createMobileUrl('index',array('cid' =>$cid,'pid' =>$pid,'op'=>'wemedia'),true)}">首页</a></li>
        </ul>
        <hr/>
        <ul>
            {php include_once IA_ROOT . '/addons/amouse_article/model.php'}
            {php $list = amouse_article_site_pcategory($cid)}
            {loop $list $nav}
                <li> <a href="{php echo $this->createMobileUrl('index',array('cid' => $nav['id'],'pid' =>$pid,'op'=>'wemedia'),true)}">{$nav[name]}</a></li>
            {/loop}
        </ul>
    </div>
</div>
{if $set['isopen']=='0'}
<footer class="footer-toolbar-fix">
 <a id="biz-link" class="btn" href="{$set['guanzhuUrl']}" >
	<div class="arrow" style="top:20px;">
		<span style="display: inline-block;width: 60px; height: 33px;line-height: 33px;background-color: #0799ff;border-radius: 5px;text-align: center;color: white;">+关注</span>
	</div>
	<div class="logo">
	<div class="circle"></div>
		<img id="img" src="{php echo tomedia('headimg_'.$account['acid'].'.jpg');}?time={php echo time()}">
	</div>
	<div id="nickname" style="color:white;"> {$_W['account']['name']}</div>
	<div id="weixinid" style="color:white;">微信号:{$_W['account']['account']} </div>
</a>
</footer>
{/if}

<div class="footer">&nbsp;</div>
<script src="{RES}js/jquery.wipetouch.js"></script>
<script src="{RES}js/main.index.js"></script>
<script src="{RES}js/TouchSlide.1.1.js?v=20150313"></script>
<script type="text/javascript">
    TouchSlide({
        slideCell: "#focus",
        titCell: ".hd ul",
        mainCell: ".bd ul",
        effect: "leftLoop",
        autoPlay: true,
        autoPage: true,
        switchLoad: "_src"
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $('.footer-toolbar-fix').show();
    });
</script>
<script language='javascript'>
    wx.ready(function () {
        shareMeta = {
            imgUrl:"{$shareimg}",
            link:"{$url}",
            desc:"{if !empty($category['description'])}{$category['description']}{else}{$_W['account']['name']}的精美图文{/if}",
            title:"{if !empty($category['title'])}{$category['title']}{else}{$_W['account']['name']}的精美图文{/if}",
            success: function(){

            },
            cancel: function(){
                // alert("分享失败，可能是网络问题，一会儿再试试？");
            }
        };
        wx.onMenuShareTimeline(shareMeta);
        wx.onMenuShareAppMessage(shareMeta);
        wx.onMenuShareWeibo(shareMeta);
        wx.onMenuShareQQ(shareMeta);
        wx.onMenuShareQZone(shareMeta);
    });
</script>
</body>
</html>